package com.training.java.core.polymorphism;

public class PolymorphismDemo {

	public static void main(String[] args) {

			PoliceCar policeCar = new PoliceCar();
			RaceCar raceCar = new RaceCar();
			
			execute(policeCar);
			execute(raceCar);
			
	}
	
	public static void execute(Car car){
		car.start();
		car.acclerate(30);
		
		System.out.println("Current Speed = " + car.getCurrentSpeed());
		
	}
	
}
